﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace eLoan.Models
{
    public class ClosedLoansReportModel
    {
        [Display(Name = "Select a branch")]
        public IEnumerable<SelectListItem> Branches { get; set; }

        public string SelectedBranchCode { get; set; }

        [Display(Name = "Date closed from")]
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:MM/dd/yyyy}")]
        public DateTime DateClosedFrom { get; set; }

        [Display(Name = "Date closed to")]
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:MM/dd/yyyy}")]
        public DateTime DateClosedTo { get; set; }

        [Display(Name = "Search text")]
        public string SearchText { get; set; }

        public List<ClosedLoanReportItem> ClosedLoanReportItems { get; set; }

    }

    public class ClosedLoanReportItem
    {
        public int BorrowerID { get; set; }

        public string BorrowerName { get; set; }

        public string ContactNo { get; set; }

        public string DocumentNo { get; set; }

        public DateTime DocumentDate { get; set; }

        public string AgentName { get; set; }

        public string Remarks { get; set; }

        public string StatusName { get; set; }

        public decimal Receivable { get; set; }

        public decimal TotalPayment { get; set; }
    }
}